using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class vector : MonoBehaviour
{
    // Start is called before the first frame update
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        Vector3 targetPosition = transform.position;
        float speed = 3.0f;
        if(transform.position.x < 7.0f)
        {
            targetPosition.x = targetPosition.x + speed * Time.deltaTime;
            float x = targetPosition.x;
            targetPosition.y = -0.15f * (x + 7.0f) * (x - 7.0f) - 3.0f;
            transform.position = Vector3.MoveTowards(transform.position, targetPosition, speed * Time.deltaTime);
        }
    }

}
